package com.ruoyi.market.enums;

import lombok.Getter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Getter
public enum ManagerTypeEnum {

    SPECIAl("1", "机构"),
    CHANNEL("2", "渠道"),
    ALL("1,2", "所有"),
    ;

    String value;
    String name;

    ManagerTypeEnum(String value, String name){
        this.value = value;
        this.name = name;
    }

    public static List<Map<String, Object>> getMapList(){
        List<Map<String, Object>> resultList = new ArrayList<>();
        for (ManagerTypeEnum item : values()) {
            Map<String, Object> itemMap = new HashMap<>();
            itemMap.put("name", item.getName());
            itemMap.put("value", item.getValue());
            resultList.add(itemMap);
        }
        return resultList;
    }
}
